package com.left.tcc.coupon.api;

import com.left.tcc.coupon.dto.CouponDTO;
import org.dromara.hmily.annotation.Hmily;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@FeignClient("tx-coupon")
@RequestMapping("/coupon")
public interface CouponApi {
    /**
     * 减优惠券
     * @param obj
     * @return
     */
    @PostMapping(value = "/decrease")
    @Hmily
    public String decrease(@RequestBody CouponDTO obj);

}
